package me.kagami.myplugin.extensions;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Supports storing the application settings in a persistent way.
 * The {@link State} and {@link Storage} annotations define the name of the data and the file name where
 * these persistent application settings are stored.
 */
@State(
        name = "me.kagami.myplugin.extensions.CustomizeSettingsState",
        storages = {@Storage("CustomizeSettingsState.xml")}
)
public class CustomizeSettingsState implements PersistentStateComponent<CustomizeSettingsState> {
    private String customizeViewPaneName;
    private String quickStart1;
    private String quickStart2;
    private String quickStart3;
    private String quickStart4;
    private String quickStart5;
    private String quickStart6;

    private String quickProject1;
    private String quickProject2;
    private String quickProject3;
    private String quickProject4;
    private String quickProject5;
    private String quickProject6;

    private String quickProjectSimpleName1;
    private String quickProjectSimpleName2;
    private String quickProjectSimpleName3;
    private String quickProjectSimpleName4;
    private String quickProjectSimpleName5;
    private String quickProjectSimpleName6;

    @Override
    public @Nullable
    CustomizeSettingsState getState() {
        return this;
    }

    public static CustomizeSettingsState getInstance() {
        return ApplicationManager.getApplication().getService(CustomizeSettingsState.class);
    }

    @Override
    public void loadState(@NotNull CustomizeSettingsState customizeSettingsState) {
        XmlSerializerUtil.copyBean(customizeSettingsState, this);
    }

    public String getCustomizeViewPaneName() {
        return customizeViewPaneName;
    }

    public void setCustomizeViewPaneName(String customizeViewPaneName) {
        this.customizeViewPaneName = customizeViewPaneName;
    }

    public void setQuickStart1(String quickStart1) {
        this.quickStart1 = quickStart1;
    }

    public void setQuickStart2(String quickStart2) {
        this.quickStart2 = quickStart2;
    }

    public void setQuickStart3(String quickStart3) {
        this.quickStart3 = quickStart3;
    }

    public void setQuickStart4(String quickStart4) {
        this.quickStart4 = quickStart4;
    }

    public void setQuickStart5(String quickStart5) {
        this.quickStart5 = quickStart5;
    }

    public void setQuickStart6(String quickStart6) {
        this.quickStart6 = quickStart6;
    }

    public String getQuickStart1() {
        return quickStart1;
    }

    public String getQuickStart2() {
        return quickStart2;
    }

    public String getQuickStart3() {
        return quickStart3;
    }

    public String getQuickStart4() {
        return quickStart4;
    }

    public String getQuickStart5() {
        return quickStart5;
    }

    public String getQuickStart6() {
        return quickStart6;
    }

    public String getQuickProject1() {
        return quickProject1;
    }

    public void setQuickProject1(String quickProject1) {
        this.quickProject1 = quickProject1;
    }

    public String getQuickProject2() {
        return quickProject2;
    }

    public void setQuickProject2(String quickProject2) {
        this.quickProject2 = quickProject2;
    }

    public String getQuickProject3() {
        return quickProject3;
    }

    public void setQuickProject3(String quickProject3) {
        this.quickProject3 = quickProject3;
    }

    public String getQuickProject4() {
        return quickProject4;
    }

    public void setQuickProject4(String quickProject4) {
        this.quickProject4 = quickProject4;
    }

    public String getQuickProject5() {
        return quickProject5;
    }

    public void setQuickProject5(String quickProject5) {
        this.quickProject5 = quickProject5;
    }

    public String getQuickProject6() {
        return quickProject6;
    }

    public void setQuickProject6(String quickProject6) {
        this.quickProject6 = quickProject6;
    }

    public String getQuickProjectSimpleName1() {
        return quickProjectSimpleName1;
    }

    public void setQuickProjectSimpleName1(String quickProjectSimpleName1) {
        this.quickProjectSimpleName1 = quickProjectSimpleName1;
    }

    public String getQuickProjectSimpleName2() {
        return quickProjectSimpleName2;
    }

    public void setQuickProjectSimpleName2(String quickProjectSimpleName2) {
        this.quickProjectSimpleName2 = quickProjectSimpleName2;
    }

    public String getQuickProjectSimpleName3() {
        return quickProjectSimpleName3;
    }

    public void setQuickProjectSimpleName3(String quickProjectSimpleName3) {
        this.quickProjectSimpleName3 = quickProjectSimpleName3;
    }

    public String getQuickProjectSimpleName4() {
        return quickProjectSimpleName4;
    }

    public void setQuickProjectSimpleName4(String quickProjectSimpleName4) {
        this.quickProjectSimpleName4 = quickProjectSimpleName4;
    }

    public String getQuickProjectSimpleName5() {
        return quickProjectSimpleName5;
    }

    public void setQuickProjectSimpleName5(String quickProjectSimpleName5) {
        this.quickProjectSimpleName5 = quickProjectSimpleName5;
    }

    public String getQuickProjectSimpleName6() {
        return quickProjectSimpleName6;
    }

    public void setQuickProjectSimpleName6(String quickProjectSimpleName6) {
        this.quickProjectSimpleName6 = quickProjectSimpleName6;
    }
}
